package com.mabs.ground.client.common;

import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.RequestException;
import com.google.gwt.place.shared.PlaceController;
import com.google.web.bindery.event.shared.EventBus;
import com.mabs.ground.client.main.ui.Main;
import com.mabs.ground.client.module.connexion.view.ConnexionView;
import com.mabs.ground.client.module.mod1.view.HelloView;
import com.mabs.ground.client.module.mod2.view.GoodbyeView;
import com.mabs.ground.shared.model.ModelBean;

/**
 * @author <a href="Email: mohamedarbi.benslimane@allence-tunisie.com">Ben
 *         Slimane Arbi</a>
 * @version 1.0
 * @since 1.0 - 25 juil. 2014 - 19:08:18
 */
public interface ClientFactory {
	EventBus getEventBus();

	PlaceController getPlaceController();

	HelloView getHelloView();

	GoodbyeView getGoodbyeView();

	public ConnexionView getConnexionView();

	Main getMain();

	public MyBeanFactory getMyBeanFactory();

	<M extends ModelBean> String serializeToJson(M m);

	<M extends ModelBean> M deserializeFromJson(String json, Class<M> clazz);

	public void getJsonRequest(String url, String requestData,
			RequestCallback requestCallback) throws RequestException;
}
